home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Interactive Reference Guide
/
C-C++ Interactive Reference Guide.iso
/
c_ref
/
csource5
/
337_01
/
l_getkey.c
< prev
next >
Wrap
C/C++ Source or Header
|
1991-01-14
|
693b
|
29 lines
/* Copyright (c) James L. Pinson 1990,1991 */
/********************** L_GETKEY.C ***************************/
#include "mydef.h"
/*****************************************************************
Usage: void get_key(char *ch, char *ext);
char *ch= character to read from keyboard.
char *ext= extended character (if any).
Reads character and extended character from keyboard.
*****************************************************************/
void get_key(char *ch, char *ext)
{
*ch=getch(); /* get the character */
if(!*ch){ /* if the character is zero (a special key) */
*ext=getch(); /* get the extension */
}
}